package org.jeecg.modules.submissionLibrary.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.submissionLibrary.entity.NumberOfApplicantsEntity;
import org.jeecg.modules.submissionLibrary.entity.SubmissionLibrary;
import org.jeecg.modules.submissionLibrary.entity.SubmissionLibraryResult;
import org.jeecg.modules.submissionLibrary.mapper.SubmissionLibraryMapper;
import org.jeecg.modules.submissionLibrary.service.ISubmissionLibraryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 投稿库
 * @Author: jeecg-boot
 * @Date:   2020-07-23
 * @Version: V1.0
 */
@Service
public class SubmissionLibraryServiceImpl extends ServiceImpl<SubmissionLibraryMapper, SubmissionLibrary> implements ISubmissionLibraryService {

    @Autowired
    private SubmissionLibraryMapper submissionLibraryMapper;

    /**
     * 投稿库列表分页查询
     * @param page
     * @param submissionLibrary
     * @return
     */
    @Override
    public Page<SubmissionLibraryResult> getPage(Page<SubmissionLibraryResult> page, SubmissionLibrary submissionLibrary) {
        return page.setRecords(submissionLibraryMapper.getPage(submissionLibrary));
    }

    /**
     * 获取报名人列表，分页查询
     * @param page
     * @param id
     * @return
     */
    @Override
    public Page<NumberOfApplicantsEntity> getNumberOfApplicants(Page<NumberOfApplicantsEntity> page, String id) {
        Page<NumberOfApplicantsEntity> pageList = page.setRecords(submissionLibraryMapper.getNumberOfApplicants(id));
        return null;
    }
}
